package com.piao.fragments;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.piao.R;
import com.piao.adapter.HomeFindAdapter;
import com.piao.utils.SpaceItemDecoration;


/**
 * 开发中
 */
public class FindFragment extends Fragment implements View.OnClickListener{
    private static final String TAG ="FindFragment" ;
    private RecyclerView recyclerView;
    private HomeFindAdapter adapter;
    public static FindFragment newInstance() {
        return new FindFragment();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_main_develop, container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        recyclerView= (RecyclerView) view.findViewById(R.id.recyclerview);
        GridLayoutManager mGridLayoutManager = new GridLayoutManager(getContext(),2);
        mGridLayoutManager.setOrientation(GridLayoutManager.VERTICAL);
        recyclerView.addItemDecoration(new SpaceItemDecoration(10));
        recyclerView.setLayoutManager(mGridLayoutManager);
        adapter=new HomeFindAdapter(getContext());
        recyclerView.setAdapter(adapter);
    }

    @Override
    public void onClick(View v) {
    }
}
